package com.team.util;

public class DateCount {

	public static String getDateCount(String str){
		String nowDate = TUtil.getNow();
		int num = nowDate.compareToIgnoreCase(str);
		if(num >0){
			return daysDeal(num);//now - past
			
		}
			return null;
	}

	private static String daysDeal(int num) {
			//month
			if((num/30) > 12){
				//year
				return num/360+"year";
			}else if((num/30)==12) {
				return 1+"year";
			}else {
				return num/30+"months";
			}
		
	}
	
}
